<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动</title>
    <style>
    ul{
        width: 1200px;
        height: 200px;
        border: 1px solid plum;
        padding: 0;
        /* 布局居中条件：1.设置宽度；2.左右外边距为auto */
        margin: 0px auto;
    }
    li{
        /* 消除li的默认样式 */
        list-style: none;
        width: 200px;
        height: 200px;
        background: palegoldenrod;
        /* 设置浮动 */
        float: left;
        margin: 0px 20px;
    }
    </style>
</head>
<body>
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
    </ul>
</body>
</html>